import { SIGN_STATUS_LIST, RESERVE_TYPE_LIST } from '@/const/type';
export const tableOption = () => {
  return {
    ...window.$crudMixins.tableOptions,
    addBtn: false,
    editBtn: false,
    delBtn: false,
    menuWidth: 200,
    labelWidth: 120,
    searchLabelWidth: 110,
    viewBtn: true,
    column: [
      {
        label: '预约类型',
        prop: 'reserveType',
        type: 'select',
        dicData: RESERVE_TYPE_LIST,
        search: true,
        span: 24,
        row: true,
      },
      {
        label: '姓名',
        prop: 'name',
      },
      {
        label: '预约记录编号',
        prop: 'id',
        width: 100,
      },
      {
        label: '预约人编号',
        prop: 'userCode',
        search: true,
      },
      {
        label: '预约人昵称',
        prop: 'nickName',
        search: true,
        width: 100,
      },
      {
        label: '预约手机号',
        prop: 'phone',
        search: true,
        width: 160,
      },
      {
        label: '籍贯（身份证）',
        prop: 'adCode',
        span: 12,
        detail: true,
      },
      {
        label: '预约时间',
        prop: 'createTime',
        type: 'date',
        width: 160,
        format: 'yyyy-MM-dd',
        valueFormat: 'yyyy-MM-dd',
        searchRange: true,
      },
      {
        label: '来访时间',
        prop: 'reserveTime',
        type: 'date',
        width: 160,
        format: 'yyyy-MM-dd',
        valueFormat: 'yyyy-MM-dd',
        search: true,
        searchRange: true,
      },
      {
        label: '宠物编号',
        prop: 'petCode',
        search: true,
        hide: true,
      },
      {
        label: '关联宠物',
        prop: 'petName',
        width: 160,
        overHidden: true,
      },
      {
        label: '爱心收容站',
        prop: 'baseName',
        search: true,
        overHidden: true,
        width: 160,
      },
      {
        label: '签到状态',
        prop: 'status',
        type: 'select',
        dicData: SIGN_STATUS_LIST,
        search: true,
      },
      {
        label: '备注',
        prop: 'closeRemark',
        viewDisplay: false,
        slot: true,
        width: 100,
      },
    ],
    group: [
      {
        label: '预约内容描述',
        prop: 'introductionGroup',
        arrow: false,
        labelWidth: 0,
        column: [
          {
            placeholder: '请输入预约内容描述：',
            prop: 'content',
            type: 'textarea',
            maxlength: 100,
            span: 24,
            minRows: 7,
            showWordLimit: true,
          },
        ],
      },
    ],
  };
};
